/*
 * @Author: funlee
 * @Email: i@funlee.cn
 * @Date: 2019-06-27 17:25:50
 * @Description: 首页-应用工具-企业信息检索-详情页
 */
import React from "react";
import "./style.scss";
import { NavLink } from "react-router-dom";
import { AsyncPage } from "@/utils/util";
import RouteMenu from "@/components/routeMenu";

const EIRBasicInfo = AsyncPage(() => import("./BasicInfo"));
const EIRBusinessChange = AsyncPage(() => import("./BusinessChange"));
const EIROpeningNotice = AsyncPage(() => import("./OpeningNotice"));
const EIRCourtNotice = AsyncPage(() => import("./CourtNotice"));
const EIRExecutedPerson = AsyncPage(() => import("./ExecutedPerson"));
const EIRLostCreditPerson = AsyncPage(() => import("./LostCreditPerson"));
const EIRAdministrativePenalties = AsyncPage(() => import("./AdministrativePenalties"));
const EIREquityFreeze = AsyncPage(() => import("./EquityFreeze"));
const EIRChattelMortgage = AsyncPage(() => import("./ChattelMortgage"));
const EIRTaxOwedInfo = AsyncPage(() => import("./TaxOwedInfo"));
const EIRLiquidation = AsyncPage(() => import("./Liquidation"));

function EIRDetails() {
    const menuLists = [
        {
            name: "基本信息",
            component: EIRBasicInfo,
            path: "/main/home/enterpriseInformationRetrieval/details/basicInfo"
        },
        {
            name: "工商变更",
            component: EIRBusinessChange,
            path: "/main/home/enterpriseInformationRetrieval/details/businessChange"
        },
        {
            name: "开庭公告",
            component: EIROpeningNotice,
            path: "/main/home/enterpriseInformationRetrieval/details/openingNotice"
        },
        {
            name: "法院公告",
            component: EIRCourtNotice,
            path: "/main/home/enterpriseInformationRetrieval/details/courtNotice"
        },
        {
            name: "被执行人",
            component: EIRExecutedPerson,
            path: "/main/home/enterpriseInformationRetrieval/details/executedPerson"
        },
        {
            name: "失信被执行人",
            component: EIRLostCreditPerson,
            path: "/main/home/enterpriseInformationRetrieval/details/lostCreditPerson"
        },
        {
            name: "行政处罚",
            component: EIRAdministrativePenalties,
            path: "/main/home/enterpriseInformationRetrieval/details/administrativePenalties"
        },
        {
            name: "股权冻结",
            component: EIREquityFreeze,
            path: "/main/home/enterpriseInformationRetrieval/details/equityFreeze"
        },
        {
            name: "动产抵押",
            component: EIRChattelMortgage,
            path: "/main/home/enterpriseInformationRetrieval/details/chattelMortgage"
        },
        {
            name: "欠税信息",
            component: EIRTaxOwedInfo,
            path: "/main/home/enterpriseInformationRetrieval/details/taxOwedInfo"
        },
        {
            name: "破产清算",
            component: EIRLiquidation,
            path: "/main/home/enterpriseInformationRetrieval/details/liquidation"
        }
    ];
    return (
        <div className="EIR-details">
            <div className="top">
                <div className="left">
                    <img src="https://dummyimage.com/50x60" alt="" className="logo" />
                    <div className="info">
                        <div className="name">中青理财</div>
                        <div className="tips">
                            <span>统一社会信用代码 91330100716105852F</span>
                            <span>法定代表人 赵四</span>
                            <span>注册日期 2018-12-12</span>
                            <span>住所 浙江省杭州市滨江区网商路699号</span>
                        </div>
                    </div>
                </div>
                <div className="right">
                    <span className="icon">关联APP</span>
                    <span>大牛理财</span>
                    <span>大牛理财</span>
                </div>
            </div>
            <ul className="menus">
                {menuLists.map((menu, index) => (
                    <li key={`menu-${index}`}>
                        <NavLink to={menu.path}>{menu.name}</NavLink>
                    </li>
                ))}
            </ul>
            <div className="common-content">
                <RouteMenu data={menuLists} />
            </div>
        </div>
    );
}

export default EIRDetails;
